<template>
	<!-- #ifdef APP-PLUS || H5 -->

	<view :class="type == 2 ? '' : 'system-content'">
		<entry ref="entryRef" v-if="type == 2"></entry>
		<system-index v-else ref="system"></system-index>
	</view>
	<!-- #endif -->
	<!-- #ifdef MP-WEIXIN -->
	<entry ref="entryRef"></entry>
	<!-- #endif -->
</template>

<script setup>
// #ifdef APP-PLUS || H5
import SystemIndex from './coach/system/index';
// #endif
import entry from './student/training/entry';
import { ref } from 'vue';
import { onShow } from '@dcloudio/uni-app';
const type = uni.getStorageSync('start-state');

const entryRef = ref(''),
	system = ref('');

onShow(() => {
	setTimeout(() => {
		// #ifdef APP-PLUS || H5
		if (type == 2) entryRef.value.showFun()
		else system.value.showFun();
		// #endif
		// #ifdef MP-WEIXIN
		entryRef.value.showFun()
		// #endif
	});
});
</script>

<style>
.system-content {
	background: linear-gradient(to bottom, #008965 0%, #008965 404rpx, #f5f5f5 404rpx, #f5f5f5 100%);

	background-attachment: fixed;
}

.top-style {
	box-sizing: border-box;
	padding-top: calc(var(--status-bar-height) + 14rpx);
	padding-bottom: 32rpx;
}
</style>
